package com.gomoney.oauth2.common.entity.shop;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.sql.Timestamp;

@Data
@TableName("shop_user")
public class ShopUser implements Serializable {

    private static final long serialVersionUID = 9115005837463623740L;
    /**
     * 正常
     */
    public static final int SHOP_STATE_NORMAL = 1;
    /**
     * 冻结
     */
    public static final int SHOP_STATE_LOSE = 0;
    /**
     * 注销
     */
    public static final int SHOP_STATE_OFF = -1;

    @TableId(type = IdType.ASSIGN_ID)
    private String uid;

    private String cid;

    private String username;

    private String password;

    private String mobile;

    private String realname;

    private String imgUrl;

    private String remark;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp createTime;

    private int state;

    private String email;

    private int gender;

    @TableField(exist = false)
    private String day;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Timestamp birthday;
}
